def f(n):
    ans=[]
    for i in range(n):
        ans.append([0]*(i+1))
    for i in range(n):
        ans[i][0]=1
        ans[i][i]=1
    for i in range(1,n):
        for j in range(1,i):
            ans[i][j]=ans[i-1][j-1]+ans[i-1][j]
    return ans


l = f(10)
print(l)